package com.whfc.ms.api.uni.service.impl;

import com.whfc.common.exception.BizException;
import com.whfc.common.result.PageData;
import com.whfc.ms.api.uni.service.MsCarWashDeviceService;
import com.whfc.uni.entity.CarWashDevice;
import com.whfc.uni.service.CarWashDeviceService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MsCarWashDeviceServiceImpl implements MsCarWashDeviceService {

    @DubboReference(interfaceClass = CarWashDeviceService.class, version = "1.0.0")
    private CarWashDeviceService carWashDeviceService;

    @Override
    public void add(CarWashDevice carWashDevice) throws BizException {
        carWashDeviceService.add(carWashDevice);
    }

    @Override
    public void edit(CarWashDevice carWashDevice) throws BizException {
        carWashDeviceService.edit(carWashDevice);
    }

    @Override
    public PageData<CarWashDevice> listPage(Integer pageNum, Integer pageSize, Integer deptId, String name, Integer type) {
        return carWashDeviceService.listPage(pageNum,pageSize,deptId,name,type);
    }

    @Override
    public List<CarWashDevice> list(Integer deptId, String name, Integer type) {
        return carWashDeviceService.list(deptId,name,type);
    }

    @Override
    public void del(Integer id) throws BizException {
        carWashDeviceService.del(id);
    }
}
